package com.weic.easycache.framework.biz;

import java.sql.SQLException;
import java.util.Map;

import com.j256.ormlite.dao.CloseableIterator;
import com.j256.ormlite.stmt.QueryBuilder;
import com.weic.easycache.framework.Param;
import com.weic.easycache.framework.json.JsonBase;

public abstract class AbsApiBiz<P extends Param, R> extends AbsBaseBiz<P, R> {

	@Override
	public abstract R getResult();

	@Override
	public abstract <D> String update(int taskId, JsonBase<D> json, boolean bgTask);
	
	@Override
	public abstract void fetchParamValues(int taskId, Map<String, String> valueMap);
	
	@Override
	public abstract boolean canBgUpdate(int taskId);
	
	@Override
	public abstract void updatePageInfo(int taskId, int pageNo, int recordCount, boolean hasMorePage);
	

	////////////////////////////////////以下方法不会调用//////////////////////////////////////////
	@Override
	public <T> String update(int taskId, CloseableIterator<T> iterator) throws SQLException {
		return null;
	}

	@Override
	public <T, ID> void createQuery(int taskId, QueryBuilder<T, ID> queryBuilder) {}
}
